<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/struts-bean" prefix="bean" %>
<%@ taglib uri="/struts-html" prefix="html" %>
<%@ taglib uri="/struts-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title><bean:message key="website.title"/></title>
<link href="CSS/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body class="body">
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border:1px; border-style:solid; border-color:#888888">
  <tr>
    <td width="20">&nbsp;</td>
    <TD height="50" align="right" valign="bottom"> 
		<a href="javascript:QuickSearch()"><br></a>    	 
	</TD>
    <td width="20">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
	<%@ include file="../nav_title.jsp" %>
	</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200" valign="top"><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
            <TR>
              <TD><IMG src="images/Bule_43.gif"></TD>
            </TR>
            <TR>
              <TD class="C_Item_bg">
              	<logic:present name="member">
				  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TR>
                      <TD class="C_login_Title"><bean:message key="member.login.label"/></TD>
                    </TR>
                    <TR>
                      <TD>
						  <TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
	                           <TR height="10"><TD></TD></TR>						  
	                           <TR height="30" class="text">
	                             <TD><bean:message key="member.logined" arg0="${member.memberName}" arg1="${member.vipMemberLevel.levelName}"/></TD>
	                           </TR>
	                           <TR height="30">
	                             <TD align="center">
	                   			   <a href="login.do?method=logout"><span class="blueText"><bean:message key="member.logout"/></span></a>          
							    </TD>
	                         </TR>
                      </TABLE> 
					</TR>
				  </TABLE>              	
              	</logic:present>
              	<logic:notPresent name="member">
	                <html:javascript formName="memLoginForm"/>
					<html:form action="/login.do?method=login" style="margin:0px;" onsubmit="return validateMemLoginForm(this);">
					  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
	                    <TR>
	                      <TD class="C_login_Title"><bean:message key="member.login.label"/></TD>
	                    </TR>
	                    <TR>
	                      <TD>
							  <TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
		                           <TR height="30">
		                             <TD class="text"><bean:message key="member.login.name"/>：
								 	<html:text property="loginName" size="10" styleClass="textBox"/>
								  </TD>
		                           </TR>
		                           <TR height="30">
		                             <TD class="text"><bean:message key="member.login.pwd"/>：
									  <html:password property="loginPwd" size="10" styleClass="textBox"/>
								  </TD>
		                           </TR>
		                           <TR height="30">
		                             <TD class="UserRegster" align="right">
		                               <html:button property="btn" onclick="reg()"><bean:message key="member.reg.text"/></html:button>
								  	<html:submit><bean:message key="member.login.text"/></html:submit>
								  </TD>
		                         </TR>
	                      </TABLE> 
						</TR>
					  </TABLE>
					  <logic:messagesPresent>
					  	<script language="javascript">
					  		alert('<html:errors property="loginError"/>');
					  	</script>
					  </logic:messagesPresent>
					</html:form>              	
              	</logic:notPresent>
			  </TD>
            </TR>
            <TR>
              <TD><IMG src="images/Bule_58.gif"></TD>
            </TR>
          </TABLE>
          <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TR>
                <TD><IMG src="images/Bule_43.gif"></TD>
              </TR>
              <TR>
                <TD class="C_Item_bg" valign="top">
					<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
					  <TR>
						<TD class="C_Sort_Title"><bean:message key="mer.category"/></TD>
					  </TR>
					   <TR>
						<TD class="redText"><bean:message key="cate.notExist"/></TD>
					  </TR>	
					  
					</TABLE>
				</TD>
              </TR>
              <TR>
                <TD><IMG src="images/Bule_58.gif"></TD>
              </TR>
          </TABLE></td>
        <td width="20">&nbsp;</td>
        <td valign="top"><br>
		<TABLE class="C_Goods_Title" cellSpacing=0 cellPadding=0 width="504" border=0 height="26">			
			<TR>
			  <TD><IMG hspace=5 src="images/Icon_shenghuofuwu.gif" width="82" height="21"></TD>
			  <TD>&nbsp;</TD>
			  <TD align="right">
			  	<A href="mer.do?method=browseSMer"><IMG hspace=5 src="images/icon_more.gif" border=0></A>
			  </TD>
			</TR>
          </TABLE>
          
          <TABLE class="C_Goods_Border" cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TR>
           		<logic:notPresent name="smerList">
           			<TD valign="top" class="redText" colspan="3">
           				<bean:message key="mer.notExist"/>
           			</TD>
           		</logic:notPresent>
           		<logic:present name="smerList"><div> 
					</div><logic:iterate id="mer" name="smerList" type="com.ORM.ReqMerchandiseInfo"><div> 
		               </div><TD valign="top" width="33%"><c:set var="label1"><bean:message key="member.login.name"/></c:set>
						<c:set var="label2"><bean:message key="member.realname"/></c:set>
						<c:set var="label3"><bean:message key="member.level"/></c:set>
						<c:set var="label4"><bean:message key="member.phone"/></c:set>
						<c:set var="label5"><bean:message key="member.regdate"/></c:set>
						<c:set var="label6"><bean:message key="member.edit"/></c:set>	
					 	<table border="0" align="center" cellpadding="0" cellspacing="0" style="background-color:lightgrey; border:0px;">
						  <tr>
							<td height="40" class="itemTitle" align="center"><bean:message key="member.manage"/></td>
						  </tr>
						  <tr>
							<td height="30" class="blueText" align="center">
								<html:link page="/Admin/adminMember.do?method=browseWord">
										 <span class="blueText"><bean:message key="word.manage"/></span>			
								</html:link>
							</td>
						  </tr>
						  <tr>
						    <td height="30" align="center">		
								<display:table name="memberList" id="row" pagesize="15" export="true" class="displaytag" requestURI="/Admin/adminMember.do?method=browseMember" >
									<display:column property="loginName" title="${label1}" sortable="true" headerClass="sortable" style="text-align:center;"/>
									<display:column property="memberName" title="${label2}" style="text-align:center;"/>
									<display:column property="memberlevel.levelName" title="${label3}" sortable="true" headerClass="sortable" style="text-align:center;"/>
									<display:column property="phone" title="${label4}" style="text-align:center;"/>
									<display:column property="regDate" title="${label5}" sortable="true" headerClass="sortable" style="text-align:center;"/>
									<display:column title="${label6}" media="html" style="text-align:center;">
										<html:link page="/Admin/adminMember.do?method=viewMember" 
												   paramId="id" 
												   paramName="row" 
												   paramProperty="id">
											<bean:message key="member.info"/>
										</html:link>					
										<html:link page="/Admin/adminMember.do?method=delMember" 
												   paramId="id" 
												   paramName="row" 
												   paramProperty="id">
											<bean:message key="member.del"/>
										</html:link>
									</display:column>
									<display:setProperty name="export.csv.filename" value="member.csv"/>
									<display:setProperty name="export.excel.filename" value="member.xls"/>
								</display:table>		
							</td>
					      </tr>
					      <tr>
						    <td height="30" align="center" class="redText"><html:errors property="delMemberStatus"/></td>
					      </tr>
					  </table>  
							
		                 
		               </TD>						
					</logic:iterate>
           		</logic:present>
			  </TR>
          </TABLE>
          <br>		  
		  
                
		  </td>
      </tr>
    </table></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="30" bgcolor="#4282CE" class="whiteText" align="center">
		<bean:message key="website.foot"/>	</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="20" colspan="3">&nbsp;</td>
  </tr>
</table>
<script type="text/javascript">
	//会员注册
	function reg(){
		window.location = "reg.jsp";
	}
	
	//搜索商品
	function QuickSearch(){
		var url = "mer.do?method=searchMer&cateid="+document.all.category.value;
		var key = document.all.qKey.value;
		if (key !=null && key!="商品关键字" && key.length>0)url = url+"&key="+key;
		window.location = url;
	}
</script>
</body>
</html>